package com.system.userconsumer.feign;

import com.system.userconsumer.domain.Address;
import org.springframework.stereotype.Component;

/**
 * @author Lisiyu
 * date 2022/10/20 22:14
 * version 1.0
 */
@Component
public class AddressFeignFallback implements AddressFeign{
    @Override
    public Address findAddressById(Integer id) {
        Address address = new Address();
        address.setId(-1000);
        address.setName("李思瑜");
        return address;
    }

    @Override
    public Address findByNameAndId(Integer id, String name) {
        Address address = new Address();
        address.setId(-999);
        address.setName("李思瑜"+name);
        return address;
    }

    @Override
    public int addAddress(Address address) {
        return -100;
    }
}
